package pl.edu.pk.mech.kkbus.model;

import java.io.Serializable;
import java.util.Date;

import com.google.appengine.api.datastore.Entity;
import static pl.edu.pk.mech.kkbus.staticstrings.HistoryLogProperty.*;

public class HistoryLog extends Pojo implements Serializable{

	private static final long serialVersionUID = -9052893797508953159L;
	private String idUser;
	private Date date;

	public HistoryLog(){}
	
	public HistoryLog(String idUser, Date date){
		this.idUser = idUser;
		this.date = date;
	}
	
	public HistoryLog(Entity entity){
		this.id = entity.getKey().getId();
		this.idUser = (String) entity.getProperty(HISTORY_LOG_ID_USER);
		this.date = (Date) entity.getProperty(HISTORY_LOG_DATE);
	}

	public String getIdUser() {
		return idUser;
	}

	public void setIdUser(String idUser) {
		this.idUser = idUser;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}
}

